package com.transfer.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.staff.entity.Staff;

@Entity
@Table(name="t_expatriate")
public class Expatriate {
	private Long id;
	private Staff staff;
	private String expaDepartment;//外派部门
	private String expaPosition;//外派职位
	private Date expaStarDate;//外派开始时间
	private Date expaEndDate;//外派结束时间
	private String reason;//外派原因
	private String phoneNum;//联系电话
	private String staffName;//
	private String staffNum;//
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getStaff() {
		return staff;
	}
	public String getExpaDepartment() {
		return expaDepartment;
	}
	public String getExpaPosition() {
		return expaPosition;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getExpaStarDate() {
		return expaStarDate;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getExpaEndDate() {
		return expaEndDate;
	}

	
	public String getReason() {
		return reason;
	}
	public String getStaffName() {
		return staffName;
	}
	public String getStaffNum() {
		return staffNum;
	}
	public String getPhoneNum() {
		return phoneNum;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setExpaDepartment(String expaDepartment) {
		this.expaDepartment = expaDepartment;
	}
	public void setExpaPosition(String expaPosition) {
		this.expaPosition = expaPosition;
	}
	public void setExpaStarDate(Date expaStarDate) {
		this.expaStarDate = expaStarDate;
	}
	public void setExpaEndDate(Date expaEndDate) {
		this.expaEndDate = expaEndDate;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}
	public void setStaff(Staff staff) {
		this.staff = staff;
	}
	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}
	public void setStaffNum(String staffNum) {
		this.staffNum = staffNum;
	}
	
}
